﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditAttractions.aspx.cs" ValidateRequest="false"
    Inherits="NJL.WebManage.Attractions.EditAttractions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <script type="text/javascript"src="/ckeditor/ckeditor.js"></script>
    <script type="text/javascript">
        function check() {
            var regInt = /^\d+$/; //整数
            var txtSort = document.getElementById("<%=txtSort.ClientID %>").value;
            if (regInt.exec(txtSort) == null) {
                alert("排序只能输入整数");
                return false;
            }
            var txtName = document.getElementById("<%=txtName.ClientID %>").value;
            if (txtName == "") {
                alert("请输入名称");
                return false;
            }
            //地区选择
            var selectArea = document.getElementById("<%=ddlProvince.ClientID %>");
            if (selectArea!= null) {
                if (selectArea.value == "000000") {
                    alert("请选择地区");
                    return false;
                }
            }
            //支付方式
//            var cbxLpayment = document.getElementById("cbxLpayment").getElementsByTagName("input").length;
//            var payment = 0;
//            for (var i = 0; i < cbxLpayment; i++) {
//                if (document.getElementById("cbxLpayment_" + i).checked == true)
//                    payment++
//            }
//            if (payment == 0) {
//                alert("请选择支付方式");
//                return false;
//            }
//            //游玩主题
//            var cbxLTheme = document.getElementById("cbxLTheme").getElementsByTagName("input").length;
//            var theme = 0;
//            for (var i = 0; i < cbxLTheme; i++) {
//                if (document.getElementById("cbxLTheme_" + i).checked == true)
//                    theme++;
//            }
//            if (theme == 0) {
//                alert("请选择游玩主题");
//                return false;
//            }
//            //游客印象
//            var cbxLimpression = document.getElementById("cbxLimpression").getElementsByTagName("input").length;
//            var pression = 0;
//            for (var i = 0; i < cbxLimpression; i++) {
//                if (document.getElementById("cbxLimpression_" + i).checked == true)
//                    pression++
//            }
//            if (pression == 0) {
//                alert("请选择游客印象");
//                return false;
//            }

            //旅游指南介绍
//            var txtDesc = document.getElementById("<%=txtDesc.ClientID %>").value;
//            if (txtDesc.length > 500) {
//                alert("旅游指南介绍内容数超过500个字符请重新输入");
//                return false;
//            }
//            //旅游指南交通
//            var txtTraffic = document.getElementById("<%=txtTraffic.ClientID %>").value;
//            if (txtTraffic.length > 500) {
//                alert("旅游指南交通内容数超过500个字符请重新输入");
//                return false;
//            }
//            //旅游指南美食
//            var txtFood = document.getElementById("<%=txtFood.ClientID %>").value;
//            if (txtFood.length > 500) {
//                alert("旅游指南美食内容数超过500个字符请重新输入");
//                return false;
//            }
//            //旅游指南购物
//            var txtBuy = document.getElementById("<%=txtBuy.ClientID %>").value;
//            if (txtBuy.length > 500) {
//                alert("旅游指南购物内容数超过500个字符请重新输入");
//                return false;
//            }
//            //旅游指南其他
//            var txtOther = document.getElementById("<%=txtOther.ClientID %>").value;
//            if (txtOther.length > 500) {
//                alert("旅游指南其他内容数超过500个字符请重新输入");
//                return false;
//            }
            //页面描述
            var txtDescription = document.getElementById("<%=txtDescription.ClientID %>").value;
            if (txtDescription.length > 100) {
                alert("页面描述内容数超过100个字符请重新输入");
                return false;
            }
        }     
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="gray_bd">
        <div class="table_title">

            景点管理-编辑景点   <%
                                
                            if (WEBSITE_CODE == "1")
                            {
                                
                                    %>
                                 <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<%=Request.QueryString["QQ"] %>&site=qq&menu=yes">
                                            <img border="0" src="http://wpa.qq.com/pa?p=2:<%=Request.QueryString["QQ"] %>:45" alt="点击这里给我发消息"
                                                title="点击这里给我发消息"></a>
                                                <%
                            }
                                             %>
        </div>
          <div class="pad5px">
            <table align="center" cellspacing="0" style="width: 100%">
                   <tr>
                    <td style="width: 120px; text-align: right;">
                        排序：</td>
                    <td>
                        <asp:TextBox ID="txtSort" runat="server" MaxLength="8" Width="50px">0</asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        &nbsp;名称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server" Width="400px" MaxLength="25"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                   
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地区：
                    </td>
                    <td>
                              
                                <asp:DropDownList ID="ddlProvince" runat="server" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged"
                                    AutoPostBack="True">
                                </asp:DropDownList>
                                &nbsp;
                                <asp:DropDownList ID="ddlCity" runat="server">
                                </asp:DropDownList>
                    
                      
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        地址：
                    </td>
                    <td>
                        <asp:TextBox ID="txtAddress" runat="server" Width="400px" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        标签：&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtTag" runat="server" Width="400px" MaxLength="100"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                     <tr>
                    <td style="width: 120px; text-align: right;">
                        图片：&nbsp;
                    </td>
                    <td>
              <asp:FileUpload ID="FileUpload1" runat="server" />&nbsp;&nbsp;<asp:Button ID="Button1" runat="server" Text="上传" OnClick="btnUpload_Click" /> 请上传600*450尺寸以内的图片
                    </td>                        
                    <td>
                        
                        &nbsp;
                    </td>
                </tr>
                      <tr>
                    <td style="width: 120px; text-align: right; vertical-align: bottom">
                        现有图片：
                    </td>
                    <td>
                        <asp:Image ID="Image1" runat="server" />
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        级别：&nbsp;
                    </td>
                    <td align="left">
                        <asp:RadioButtonList ID="rbtnLevel" runat="server" CellPadding="0" CellSpacing="0"
                            RepeatDirection="Horizontal">
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        &nbsp;本站价格：
                    </td>
                    <td>
                        <asp:TextBox ID="txtPrice" runat="server" Width="50px" MaxLength="9" style="text-align:right">0</asp:TextBox>
                        市场价格：<asp:TextBox ID="txtSupPrice" runat="server" Width="50px" MaxLength="9" style="text-align:right">0</asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        支付方式：&nbsp;
                    </td>
                    <td align="left">
                        &nbsp;
                        <asp:CheckBoxList ID="cbxLpayment" runat="server" CellPadding="0" CellSpacing="0"
                            RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        游玩主题：
                    </td>
                    <td align="left">
                        <asp:CheckBoxList ID="cbxLTheme" runat="server" CellPadding="0" CellSpacing="0" RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        游客印象：
                    </td>
                    <td align="left">
                        <asp:CheckBoxList ID="cbxLimpression" runat="server" CellPadding="0" CellSpacing="0"
                            RepeatDirection="Horizontal">
                        </asp:CheckBoxList>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        景点介绍：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTicketNotice" runat="server" TextMode="MultiLine" Height="61px" Width="100%"></asp:TextBox>
                        <script type="text/javascript">
                            CKEDITOR.replace('<%=txtTicketNotice.ClientID%>',
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
                        </script> 
        
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        旅游指南介绍：
                    </td>
                    <td>
                        <asp:TextBox ID="txtDesc" runat="server" TextMode="MultiLine" Height="61px" Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        旅游指南交通：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTraffic" runat="server" TextMode="MultiLine" Height="61px" Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        旅游指南美食：
                    </td>
                    <td>
                        <asp:TextBox ID="txtFood" runat="server" TextMode="MultiLine" Height="61px" Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        旅游指南购物：
                    </td>
                    <td>
                        <asp:TextBox ID="txtBuy" runat="server" TextMode="MultiLine" Height="61px" Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr style="display:none">
                    <td style="width: 120px; text-align: right;">
                        旅游指南其他：
                    </td>
                    <td>
                        <asp:TextBox ID="txtOther" runat="server" TextMode="MultiLine" Height="61px" Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面标题：
                    </td>
                    <td>
                        <asp:TextBox ID="txtTitle" runat="server" Width="100%" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面关键字：
                    </td>
                    <td>
                        <asp:TextBox ID="txtKeyWords" runat="server" Width="100%" MaxLength="50"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        页面描述：
                    </td>
                    <td>
                        <asp:TextBox ID="txtDescription" runat="server" Height="51px" TextMode="MultiLine"
                            Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Style="height: 21px"
                            Text="提交" Width="40px" OnClientClick="return check()" />
                        &nbsp;<input id="Reset1" type="reset" value="返回" onclick="location.href='AttractionsManage.aspx?Page=<%=Request["Page"]%>'" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
